#!/bin/bash

cd `dirname $0`

if [ "$1" == "" ]; then
 VERSION=`cat .piversion`
 echo No version given, assuming Pi$VERSION
else
 VERSION=$1
fi

BRDIR=`./brdir $VERSION`
echo "Cleaning $BRDIR"

if [ "$BRSRCDIR" == "" ]; then
 BRSRCDIR=../build-root
fi

cd ../buildroot
make O=$BRDIR clean
